<?php
declare(strict_types=1);

namespace app\admin\service;

use app\admin\model\Role as RoleModel;

class RoleService
{
    /**
     * 部门数据
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getDepartmentList()
    {
        return RoleModel::getDepartmentList();
    }

    /**
     * 单部门数据
     * @param $where
     * @param string $field
     * @return mixed
     */
    public static function findDepartmentValue($where, $field = "name")
    {
        return RoleModel::findDepartmentValue($where, $field);
    }
}